package com.qyhl.party.party;

import com.qyhl.webtv.commonlib.entity.party.PartyLoginBean;
import com.qyhl.webtv.commonlib.entity.party.PartyUserInfo;

public class PartyHomePresenter implements PartyHomeContract.PartyHomePresenter {
    private PartyHomeContract.PartyHomeView mView;
    private PartyHomeModel mModel;

    public PartyHomePresenter(PartyHomeContract.PartyHomeView mView) {
        this.mView = mView;
        this.mModel = new PartyHomeModel(this);
    }

    @Override
    public void isLogin() {
        mModel.isLogin();
    }

    @Override
    public void getUserInfo(String token) {
        mModel.getUserInfo(token);
    }

    @Override
    public void LoginSuccess(PartyLoginBean bean) {
        mView.LoginSuccess(bean);
    }

    @Override
    public void LoginError(String msg) {
        mView.LoginError(msg);
    }

    @Override
    public void setInfo(PartyUserInfo bean) {
        mView.setInfo(bean);
    }

    @Override
    public void setError(String msg) {
        mView.setError(msg);
    }
}
